home *** CD-ROM | disk | FTP | other *** search
- Path: top.MTS.Net!root
- From: root@top.MTS.Net
- Newsgroups: comp.lang.c
- Subject: problem recongnizing eof from pipe
- Date: Wed, 10 Apr 1996 20:44:57 -0500
- Organization: MTS Internet Services
- Message-ID: <Pine.A32.3.91.960410203441.19010A-100000-100000@top.MTS.Net>
- NNTP-Posting-Host: top.mts.net
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
-
- Hi. I'm working on a program which passess it's data through an external
- command using two pipes. One pipe is connect to stdin of the forked
- process and the other is connected to stdout. The parent program has no
- problems sending the data to the commend via the send pipe, however it
- doesn't seem to recognize when the return stream is finished.
-
- This is under AIX 4.1.3. In the parent program I open the file
- descriptor of the return pipe and read it with a fgetc command. I am
- currently checking for an EOF character (which never arrives) and check the
- file descriptor for eof() condition. Sometimes I get a couple of extra
- characters, other times I lose them.
-
- Any examples or suggestions would be welcome. I've been using the
- O'Reilly Using C on the Unix System as my reference.
-
- If you can, please email to the addresses below.
-
- Thanks
-
- Wes Friesen
- wfriesn@mts.net or admin@mts.net
-